package a.h;

import a.i.n;

import java.util.Properties;

class xb
{
  private static int a = 5;
  
  public static Properties a(jd paramjd, String paramString)
  {
    int i = ec.t;
    boolean bool = ec.s;
    n.a(a, "Search tag.. " + paramString);
    String str = "";
    label52:
    label111:
    label116:
    do
    {
      for (;;)
      {
        if (!paramjd.hasMoreTokens()) {
          break label125;
        }
        if (bool) {
          break label130;
        }
        if (str.equals(paramString)) {
          break label125;
        }
        n.a(a, "Search <.. ");
        do
        {
          for (;;)
          {
            if (!paramjd.hasMoreTokens()) {
              break label111;
            }
            if (i != 0) {
              break label52;
            }
            if (bool) {
              break;
            }
            if (str.equals("<")) {
              break label111;
            }
            try
            {
              str = paramjd.nextToken();
            }
            catch (Exception localException1)
            {
              if (i != 0) {
                break label116;
              }
            }
          }
        } while (!bool);
        try
        {
          str = paramjd.nextToken();
        }
        catch (Exception localException2) {}
      }
    } while (!bool);
    label125:
    if (!str.equals(paramString))
    {
      n.a(a, "Tag not found !");
      return null;
    }
    label130:
    n.a(a, "Tag found, search key value pairs.. " + paramString);
    if (str.equals(paramString))
    {
      Properties localProperties = new Properties();
      c(paramjd, localProperties);
      return localProperties;
    }
    return null;
  }
  
  public static String c(jd paramjd, String paramString)
  {
    int i = ec.t;
    boolean bool = ec.s;
    StringBuffer localStringBuffer = new StringBuffer();
    n.a(a, "Search tag.. " + paramString);
    String str1 = "";
    label149:
    label150:
    label160:
    do
    {
      do
      {
        if (!paramjd.hasMoreTokens()) {
          break;
        }
        if (i != 0) {
          break label199;
        }
        if (str1.equals(paramString)) {
          break;
        }
        n.a(a, "Search <.. ");
        do
        {
          do
          {
            do
            {
              if (!paramjd.hasMoreTokens()) {
                break;
              }
              if (i != 0) {
                break label149;
              }
              if (str1.equals("<")) {
                break;
              }
              try
              {
                str1 = paramjd.nextToken();
              }
              catch (Exception localException1) {}
            } while (str1.equals("<"));
            localStringBuffer.append(str1);
            if (i != 0) {
              break label160;
            }
            if ((i == 0) && (bool)) {
              break label150;
            }
          } while (i != 0);
        } while (!bool);
        try
        {
          str1 = paramjd.nextToken();
        }
        catch (Exception localException2) {}
      } while (str1.equals(paramString));
      localStringBuffer.append(str1);
      if (i != 0) {
        break label199;
      }
      if (i != 0) {
        break label252;
      }
      if (bool) {
        break label242;
      }
    } while ((i == 0) && (!bool));
    label199:
    if (i == 0) {
      if (!str1.equals(paramString))
      {
        n.a(a, "Tag not found !");
        return null;
      }
    }
    n.a(a, "Tag found, search key value pairs.. " + paramString);
    label242:
    if ((i != 0) || (str1.equals(paramString)))
    {
      label252:
      String str2 = "";
      Properties localProperties = new Properties();
      do
      {
        if (str2 == null) {
          break;
        }
        str2 = a(paramjd);
        if (bool) {
          break label355;
        }
        if (str2 == null) {
          return localStringBuffer.toString();
        }
        do
        {
          for (;;)
          {
            if (!paramjd.hasMoreTokens()) {
              break label330;
            }
            if (!bool)
            {
              if (str1.equals("=")) {
                break label330;
              }
              try
              {
                str1 = paramjd.nextToken();
              }
              catch (Exception localException3) {}
            }
          }
        } while (!bool);
        String str3 = a(paramjd);
        localProperties.setProperty(str2, str3);
      } while (!bool);
    }
    label330:
    label355:
    return localStringBuffer.toString();
  }
  
  public static String a(jd paramjd, Properties paramProperties)
  {
    int i = ec.t;
    boolean bool = ec.s;
    String str1 = "";
    n.a(a, "Search tag.. ");
    String str2 = "";
    n.a(a, "Search <.. ");
    do
    {
      do
      {
        for (;;)
        {
          if (!paramjd.hasMoreTokens()) {
            break label78;
          }
          if ((i != 0) || (bool)) {
            break label82;
          }
          if (str2.equals("<")) {
            break label78;
          }
          try
          {
            str2 = paramjd.nextToken();
          }
          catch (Exception localException1) {}
        }
      } while (i != 0);
    } while (!bool);
    label78:
    if (!paramjd.hasMoreTokens()) {
      label82:
      return null;
    }
    try
    {
      str1 = paramjd.nextToken();
    }
    catch (Exception localException2) {}
    n.a(a, "Tag " + str1 + " found, search key value pairs.. " + str1);
    c(paramjd, paramProperties);
    return str1;
  }
  
  private static void c(jd paramjd, Properties paramProperties)
  {
    int i = ec.t;
    boolean bool = ec.s;
    Object localObject = "";
    label120:
    do
    {
      if (!paramjd.hasMoreTokens()) {
        break;
      }
      String str2 = "\n";
      do
      {
        do
        {
          for (;;)
          {
            if (!paramjd.hasMoreTokens()) {
              break label158;
            }
            if (i != 0) {
              break label226;
            }
            if (bool) {
              break label165;
            }
            break label214;
            if (!str2.equals("\t"))
            {
              if (i != 0) {
                break label120;
              }
              if (!str2.equals("\n"))
              {
                if (i != 0) {
                  break label120;
                }
                if (!str2.equals("\r"))
                {
                  if (i != 0) {
                    break label120;
                  }
                  if (!str2.equals(" "))
                  {
                    if (i != 0) {
                      break label162;
                    }
                    if (!str2.equals("\f")) {
                      break label158;
                    }
                  }
                }
              }
            }
            try
            {
              str2 = paramjd.nextToken();
              n.a(a, "Examin token " + str2);
            }
            catch (Exception localException1) {}
          }
        } while (i != 0);
      } while (!bool);
      if (str2.equals(">")) {
        return;
      }
      localObject = str2;
      n.a(a, "Found name: " + (String)localObject);
      if (i == 0) {
        if (!paramjd.hasMoreTokens()) {
          return;
        }
      }
      do
      {
        for (;;)
        {
          if (!paramjd.hasMoreTokens()) {
            break label273;
          }
          if (i != 0) {
            break;
          }
          if (bool) {
            break label280;
          }
          if (str2.equals("=")) {
            break label273;
          }
          if (i != 0) {
            break label277;
          }
          if (str2.equals(">")) {
            break label273;
          }
          try
          {
            str2 = paramjd.nextToken();
          }
          catch (Exception localException2) {}
        }
        if (i != 0) {
          break;
        }
      } while (!bool);
      if (str2.equals(">")) {
        return;
      }
      String str1 = a(paramjd);
      paramProperties.setProperty((String)localObject, str1);
    } while (!bool);
    label158:
    label162:
    label165:
    label214:
    label226:
    return;
  }
  
  private static String a(jd paramjd)
  {
    int i = ec.t;
    boolean bool = ec.s;
    String str1 = "";
    String str2 = "";
    do
    {
      do
      {
        for (;;)
        {
          if (!paramjd.hasMoreTokens()) {
            break label72;
          }
          if ((i != 0) || (bool)) {
            break label79;
          }
          if (str1.equals("\"")) {
            break label72;
          }
          try
          {
            str1 = paramjd.nextToken();
            if (str1.equals(">")) {
              return null;
            }
          }
          catch (Exception localException1) {}
        }
      } while (i != 0);
    } while (!bool);
    label72:
    str1 = "";
    label79:
    do
    {
      for (;;)
      {
        if (!paramjd.hasMoreTokens()) {
          return str2;
        }
        if (bool) {
          break label149;
        }
        if ((i == 0) && (str1.equals("\""))) {
          return str2;
        }
        try
        {
          str1 = paramjd.nextToken();
          if ((i != 0) || (!str1.equals("\""))) {
            str2 = str2 + str1;
          }
        }
        catch (Exception localException2) {}
      }
    } while (!bool);
    label149:
    return str2;
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.h.xb

 * JD-Core Version:    0.7.0.1

 */